//
//  ReadingFirstPageCollectionCell.m
//  SunXi
//
//  Created by dllo on 15/11/26.
//  Copyright © 2015年 大远. All rights reserved.
//

#import "ReadingFirstPageCollectionCell.h"


@implementation ReadingFirstPageCollectionCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        self.image = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WH, HT)];
        [self addSubview:self.image];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, HT / 100 * 80, WH, HT  / 100 * 18)];
        [self addSubview:self.label];
        self.label.font = [UIFont systemFontOfSize:18 weight:13];
        self.label.textColor = [UIColor whiteColor];
    }
    return self;
}


- (void)setModel:(ReadingFirstModel *)model{
    
    if (_model != model) {
        
        [self.image sd_setImageWithURL:[NSURL URLWithString:model.coverimg]placeholderImage:[UIImage imageNamed:@"zan"]];
        self.label.text = model.name;
    }
    
}



@end
